
This README file explains the main Matlab file Asymmetric_Network_RESTAT.m that replicates the main results of "Asymmetric Network Connectedness of Fears" by Barunik, Bevilacqua, Tunaru and describes the files contained in this folder - both inputs for the codes and outputs.

In this folder we also provide the main dataset used by the paper, namely the decomposed implied volatilities in the file IV_Data.mat

Note that all options data and prices are under OptionMetrics licence agreement and copyright. As discussed in section 2: Data on U.S. stock options are specifically collected from IvyDBUS/v3.1/History/IVYOPPRCD and IvyDBUS/v3.1.1/History/IVYOPPRCD at ftp.ivydb.com hence we provide already processed implied volatilities used in the paper.

All the results in this paper have been generated with MATLAB versions R2016a, R2016b. 

Auxiliary functions needed to run the main file:

	a) DYFunctReplica.m
 	b) ols.m
 	c) Perform_CW_test.m
 	d) nwest.m

The main code sections correspond to the structre of the results as they appear in the paper and are as follows:

1) 	Code to load the main dataset: IV series (financial sector VIXs) and plot the one for CitiGroup as an example. 
	It reproduces Figure 1 of the paper. More details on the decomposed IV series can be found in section 2 of the paper. 
	Output: Figure 1.


2) Asymmetric Connectedness Network of Fears; main results divided in five parts.

	a) 	Static Fear Connectedness tables in the paper for the aggregate VIX series following DY 
		2012 methodology as described extensively in sections 3 and 4 of the paper. It reproduces the results of section 4.1, 
		namely Table 1 when the aggregate VIX series -- IV_TOT - is input. 
		It also generate Table 2 if the decomposed IV series are input.
		Output: Table 1 and 2.

	b) 	Total Fear Network index of US financial institution VIX. We follow the DY 2012 methodology in dynamics 
		to compute the time series of the aggregate VIX as described in sections 3 and 4 of the paper.
		Output: Figure 2.

	c) 	Asymmetric fear connectedness (AFC) measure as described in sections 3 and 4 of the paper 
		and reproduce results in section 5, namely Figure 3.
		Output: Figure 3.

	d) 	Compute TO, FROM and NET connectedness for total VIX and decomposed VIXs.

	e) 	Explain how to generate Figure 4, Case study for Goldman Sachs.  
   		Output: Figure 4.

Note: The same results as discussed in section 2) of the paper as well as the README file can be generated in R by using the package: 

https://github.com/barunik/frequencyConnectedness

and following section 3 of the paper for the choice of parametres and window length.


3) Out-of-sample Predictability.

   We here also provide a sample code to replicate the out-of-sample exercise, which is reported inTable 3.
   The Data used in this section are aggregated as described in section 6 of the paper.
   The data sample we provide here are the three quarterly aggregated Connectedness measures as well as the CFNAI publicly collected from: 
   https://www.chicagofed.org/publications/cfnai/index. (see also Online appendix of the paper for data definitions and sources).
   Output: Table 3.

